(1) Field of the Invention
This invention relates to a channel address control system for a virtual machine system, particularly to a channel address control system for a virtual machine system providing a virtual storage function.
(2) Description of the Prior Art
In recent years, the concept of a "virtual machine" has been introduced and various attempts have been made to put it into practical use. The concept of a virtual machine is described in detail, for example, in the "IBM SYSTEM JOURNAL" 1972, No. 2. The advantages of the virtual machine can be summarized by the following two points:
(1) Users employing this machine system can obtain results similar to the results obtained from a single hardware machine system.
(2) It is possible to provide virtual machine systems that have a different architecture or a different structure.
Therefore, by using a virtual machine system, it is possible to simultaneously run the programs under the control of an operating system (OS) and flexibly modify the system structure. Thus, monitoring of the operating conditions of the system becomes possible and users can effectively use a debugging function which is provided. FIG. 1 illustrates the concept of an existing general machine system, and FIG. 2 shows the concept of a virtual machine system. In FIG. 1 and FIG. 2, a real machine system refers to actual machine hardware. The operating system (OS) monitors each program and controls the use of the machine resources (central processing unit, main storage area, channel, input/output control unit, input/output device and system console, etc.) by each program. In addition, a conceptual interface described in the drawings as a hardware interface is set up between the operating system and the real machine. A user program/OS interface is set up between user programs and the operating system. In the virtual machine system shown in FIG. 2, a program called a virtual machine monitor (VMM) monitors a plurality of operating systems (OS#o to OS#m) so that each program can use the machine resources. The portion enclosed by the dotted line on FIG. 2 is an existing general machine system called a virtual machine (VM). A plurality of virtual machines may be run under the control of the virtual machine system.
Currently a multiprogramming technique is widely used for the effective operation of machine systems, and each program commonly uses the system resources (central processing unit, main storage data, channel, input/output control unit, input/output device and system console etc.).
The system resources are monitored by the operating system and usually access to the system resources can be had only by an instruction issued by the operating system. This instruction is called a "priviledged instruction".
Each user program is assigned a "non-priviledged mode", and when the user program issues the "privledged instruction", a program interruption called an "exceptional privileged instruction" is detected.
In the case of a virtual machine system, plural operating systems are capable of running simultaneously, and therefore the system resources are monitored by the program called a virtual machine monitor (VMM) instead of by each operating system. Programs of each virtual machine (VM#o to VM#m), including the operating system, are all assigned the "non-privileged mode", and only the virtual machine monitor (VMM) operates on the "privileged mode". Thus, when the operating system of one of the virtual machines tries to use the "privileged instruction", program interruption is detected, execution control is handed to the virtual machine monitor, and the virtual machine monitor simulates a "privileged instruction".
In the virtual machine described above, several operating systems run simultaneously and therefore to obtain desired performance, it is necessary to provide space in the main storage area of the real machine equal to (usual space) x (number of operating systems). In present virtual machine systems a virtual memory system is used due to a problem of the cost of main storage area. When a virtual memory system is used, the main storage area is monitored by the virtual machine monitor as will be explained below. Therefore, the role of the virtual machine monitor can be outlined as follows:
(1) Effectively controlling each user program (and operating system) to supervise the efficient use of the system resources
(2) Simulating the "privileged instruction" issued from each operating system
(3) Receiving all interruptions (including I/O interruption, external interruption and interruption related to the virtual storage area), executing processing according to the interruption causes and informing, if necessary, each operating system of the interruption
(4) Monitoring of the main storage area in the virtual machine system as explained below.
FIG. 3 illustrates the address space in the virtual machine system. FIG. 4 shows an embodiment of the address space. In this example, the operating systems controlled by the virtual machine system employ a virtual storage system. In FIG. 3, the virtual address and the real address are addresses in the virtual storage area being monitored by the operating system, and dynamic address translation (DAT) is realized by using the address translation table monitored by the operating system. In the general machine system (not a virtual machine system), this real address corresponds to the main storage address, but in the virtual machine system, since a plurality of operating systems exist simultaneously, space in the main storage area of the host machine runs short. For this reason, the real address being monitored by the operating system is considered as the logical address in the host machine, and the main storage area of the host machine is monitored by the virtual machine monitor. This is called double paging. Double paging causes considerable overhead in the preformance. Thus, in order to realize high speed operation it has been proposed that a table (called a shadow table) be prepared. The shadow table is obtained by combining two DAT tables for the virtual machine monitor. The virtual machine monitor monitors a corresponding table between the logical address monitored by the operating system and the main storage address of the host machine.
If any of the aforementioned DAT tables is modified, it must be reflected on the shadow table, and this processing is performed by the virtual machine monitor. FIG. 4 illustrates an example where the logical page address 16 being monitored by the operating system corresponds to the real page address 100 of the host machine being monitored by the virtual machine monitor. In FIG. 4, A indicates the DAT table generated by the operating system and the logical page address 16 is copied from the real page address 6. The DAT table C is generated by the virtual machine monitor and the real page address 6 of the operating system is copied from the real page address 100 of the host machine. B is the shadow table and the logical page address 16 is copied to the real page address 100 of the host machine.
Explained above is the monitoring of the main storage area in the central processing unit (CPU), but the following explains the channel processing performed by the virtual machine monitor. When the operating system of virtual machine system issues an input/output device starting instruction, this instruction is a privileged instruction and is output to the virtual machine monitor. The channel program required for the operating system in the virtual machine system to start the input/output devices is described by the real address monitored by the operation system. Therefore, the virtual machine monitor generates this channel program in the main storage area monitored by the virtual machine monitor, for reconversion of the data address, the command control word (CCW) address, etc. into the real addresses on the host machine. Thus, CCW modification by user program is not supported.
A virtual machine system has various merits as described in the beginning of this specification, but if a certain program is run under the control of a virtual machine system, performance is degraded to a certain degree due to the overhead which is peculiar to the virtual machine system. The overhead can be classified into direct overhead and indirect overhead as indicated below.
(1) Direct overhead:
An overhead, mainly occurring during processing in accordance with the software of a virtual machine monitor, which can be categorized as follows:
(a) Overhead due to simulation of the privileged instruction
Since each user program including the operating system used are given assignment of the "non-privileged mode" as explained above, the privileged instruction issued by the operating systems are all simulated by the virtual machine monitor.
(b) Overhead for changing each user program
(c) Overhead for supporting the virtual storage function of the operating system
This is an overhead for monitoring the shadow table mentioned above.
(d) Overhead for channel program conversion
Since the channel program used by the operating system for starting the input/output device is the logical address for the host machine system, it is converted to the real address of the host machine system by the virtual machine monitor.
(e) Overhead for supporting interruption
Since all interruptions are detected by the virtual machine monitor, if such interruption is necessary, it must be reflected by the operating system, and such processing is performed by the virtual machine monitor.
(f) Support of console functions
The virtual machine system monitor supports the console functions including the debugging function
(2) Indirect overhead:
The operating system currently used comprises various algorithms for the method of assignment and for monitoring the resources to obtain highly efficient application of system resources, but if these are run under the control of the virtual machine system, the reverse effect results. As already explained, the virtual machine system has various merits but it also causes performance deterioration.